<template>
  <div style="display: flex;flex-direction: column;padding: 20px;margin-left: 90px">
    <div style="color: black;font-weight: bold;margin-left: -800px">
      编号：{{comment.cid}}
    </div>
    <el-input
        v-model="comment.content"
        style="width: 240px; margin: 10px"
        :rows="2"
        type="textarea"
    />
    <div style="display: flex;justify-content: flex-start">
      <el-tag type="primary"  style="margin-right: 100px">分享</el-tag>
      <div>
        <el-icon style="padding: 5px"><View /></el-icon><span style="color: #939292">{{randomOffset1}}</span>
      </div>
      <div>
        <el-icon style="padding: 5px"><ChatDotRound /></el-icon><span style="color: #939292">{{randomOffset2}}</span>
      </div>
      <div>
        <el-icon style="padding: 5px"><StarFilled /></el-icon><span style="color: #939292">{{randomOffset3}}</span>
      </div>
    </div>
  </div>

</template>

<script setup>

import {ChatDotRound,StarFilled, View} from "@element-plus/icons-vue";
import {onMounted} from "vue";

const time = generateRandomTimestamp()
const randomOffset1 = Math.floor(Math.random() * 100);
const randomOffset2 = Math.floor(Math.random() * 100);
const randomOffset3 = Math.floor(Math.random() * 100);
const props = defineProps({
  comment:Object,
  index:Number
})
onMounted(()=>{
  console.log("props",props.comment)
})
function generateRandomTimestamp() {
  const now = Date.now();
  const randomOffset = Math.floor(Math.random() * 1000000);
  return now + randomOffset;
}
</script>

<style scoped>

</style>
